package com.resifind.www.exception;

import com.resifind.www.constant.ErrorCode;

/**
 * @author 36069
 */
public class BaseException extends RuntimeException {
    protected int code;
    protected String msg;

    public BaseException(ErrorCode errorCode) {
        this.code = errorCode.getCode();
        this.msg = errorCode.getMsg();
    }

    public BaseException(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
